package com.e3.basdoc.goods.client;

import java.util.List;

import com.e3.basdoc.goods.model.GoodsModel;
import com.e3.basdoc.goods.model.GoodsQC;
import com.e3.web.core.client.RPCServiceHelper;
import com.e3.web.core.client.WebException;
import com.extjs.gxt.ui.client.data.PagingLoadConfig;
import com.extjs.gxt.ui.client.data.PagingLoadResult;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;

public interface GoodsRPCService extends RemoteService {
	public static class Util {

		private static GoodsRPCServiceAsync instance;

		public static GoodsRPCServiceAsync getInstance() {
			instance = (GoodsRPCServiceAsync) RPCServiceHelper.getService(GoodsRPCService.class.getName());
			if (instance == null) {
				instance = GWT.create(GoodsRPCService.class);
				RPCServiceHelper.registerServiceEntryPoint(instance);
			}
			return instance;
		}

	}

	public GoodsModel newGoods(GoodsModel model) throws WebException;
	
	public GoodsModel modifyGoods(GoodsModel model) throws WebException;
	
	public List<GoodsModel> getGoodsByCondition(GoodsQC qc) throws WebException;
	
	public void deleteGoodss(List<GoodsModel> models) throws WebException;
	
	PagingLoadResult<GoodsModel> getPagingGoods(PagingLoadConfig config) throws WebException;

}
